import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ReaderBytes {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		FileInputStream fis = new FileInputStream(new File(args[0]));

		int b1 = fis.read();
		int b2 = fis.read();
		
		fis.close();
		
		System.out.println("Ara com punyetes ho llegim?");
		System.out.println("Com a string: "+(char)b1+""+(char)b2);
		System.out.println("Com a ints: "+b1+","+b2);
		System.out.println("Com a un sol numero: "+Integer.toHexString(b1)+","+Integer.toHexString(b2));
		
		// 10101010 01010101
		
		
	}

}
